CC = g++
LIBS = random-source.o queue.o entities.o server.o scenario.o argpars.o problem.o
DEBUG = -g

simulation : simulation.o $(LIBS) 
	$(CC) -o $@ $(DEBUG) $^
test : test.o $(LIBS)
	$(CC) -o $@ $(DEBUG) $^
test.o : test.cpp header.h argpars.h
	$(CC) -c $(DEBUG) $<
simulation.o : simulation.cpp header.h argpars.h
	$(CC) -c $(DEBUG) $<
random-source.o : random-source.cpp header.h argpars.h 
	$(CC) -c $(DEBUG) $<
server.o : server.cpp header.h argpars.h
	$(CC) -c $(DEBUG) $<
queue.o : queue.cpp header.h argpars.h 
	$(CC) -c $(DEBUG) $<
entities.o : entities.cpp header.h argpars.h 
	$(CC) -c $(DEBUG) $<
scenario.o : scenario.cpp header.h argpars.h
	$(CC) -c $(DEBUG) $<
argpars.o : argpars.cpp header.h argpars.h
	$(CC) -c $(DEBUG) $<
problem.o : problem.cpp header.h argpars.h
	$(CC) -c $(DEBUG) $<
clean:
	rm -f *.o test simulation *.csv
all:
	make test
	make simulation
wc:
	wc -lwc *.h *.cpp Makefile
release:
	make clean
	make DEBUG=
